package com.iptv.grape.event.imp;

import com.iptv.grape.BaseActivity;
import com.iptv.grape.bu.AppConfig;
import com.iptv.grape.event.JSRequest;
import com.iptv.grape.event.proc.IWebViewMessageProc;
import com.iptv.grape.util.AppLog;
import com.iptv.grape.video.XMediaPlayer;
// 设置当前的 EPG版本号
public class SetEpgVerProc implements IWebViewMessageProc {
    String epgVer = "";

    @Override
    public void init(JSRequest jsRequest) {
        try {
            epgVer =  jsRequest.getJsonObject().getString("data");
            //String epgVer = (String) jsRequest.getJsonObject().get("data");
            //AppLog.getCurLog().out(epgVer);
        }
        catch (Exception e){
            epgVer = "";
        }
    }

    @Override
    public String procMessage(BaseActivity baseActivity, XMediaPlayer mediaPlayer) {
        AppConfig.getAppConfig().setEpgVer(epgVer);
        return "";
    }
}
